/*
 * @ProblemId: 
 * @Probtitle: 
 * @Location: 
 * @Author: Morales
 * @Date: 2020-12-23 12:04:33
 * @LastEditTime: 2020-12-23 12:08:14
 * @Space: https://space.bilibili.com/350869102
 * @E-mail: lovexposed@foxmail.com
 * @Blog: https://blog.csdn.net/baidu_41248654
 * @Powered by: Havoc_Wei
 */
//#pragma GCC optimize(2)
#include<bits/stdc++.h>
using namespace std;
#define maxsize 20
typedef int KeyType;
typedef struct{
    KeyType key;
    // InfoType otherinfo;
}RedType;
typedef struct{
    RedType r[maxsize+1]; // r[0]闲置或用作哨兵单元
    int len;
}SqList;

void SelectSort(SqList &L)
{
    for(int i=1; i<L.len; i++)
    {
        int k = i;
        for(int j=i+1; j<=L.len; j++)
            if(L.r[j].key < L.r[k].key) k = j;
        if(k != i)
        {
            swap(L.r[i], L.r[k]);
        }
    }
}

int main()
{
    //ios::sync_with_stdio(false);
    SqList L;
    int x, len=0;
    len++;
    while(cin>>x && x)
    {
        L.r[len].key = x;
        len++;
    }
    L.len = len-1;
    SelectSort(L);
    for(int i=1; i<len; i++)
        cout<<L.r[i].key<<" ";
    return 0;
}